<?php
/* @var $this ServiceTopicController */
/* @var $model ServiceTopic */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'service-topic-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->hiddenField($model,'service_id'); ?>
	
	<div class="row">
		<?php echo $form->labelEx($model,'topic_id'); ?>
		<?php echo $form->dropDownList($model,'topic_id', CHtml::listData(Topic::model()->findAll(), 'id', 'name_en'), array('empty'=>'select Type')); ?>
		<?php echo CHtml::link('Add new topic', array('topic/create'));?>
		<?php echo $form->error($model,'topic_id'); ?>
	</div>

  <?
    $this->widget('zii.widgets.jui.CJuiTabs', array(
      'tabs'=>array(
        'English' =>$this->renderPartial('_formDetail', array('model' => $model, 'form' => $form, 'language' => 'en'), $this),
        'Thai'=>$this->renderPartial('_formDetail', array('model' => $model, 'form' => $form, 'language' => 'th'), $this),
      )
    ));
  ?>  

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->